package com.shanghaiyimu.yimiyangche.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.shanghaiyimu.yimiyangche.R;

public class NewCarActivity extends AppCompatActivity implements View.OnClickListener{

    private ImageView back;
    private TextView xiaoliang,jiangjia;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_new_car);
        back = (ImageView) findViewById(R.id.newCar_bar_img_back);
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        initView();
    }

    private void initView() {
        xiaoliang = (TextView) findViewById(R.id.xiaoliangpaihang_tehuiche);
        jiangjia = (TextView) findViewById(R.id.jiangjiapaihang_tehuiche);
        xiaoliang.setOnClickListener(this);
        jiangjia.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.xiaoliangpaihang_tehuiche:
                startActivity(new Intent(NewCarActivity.this,THXiaolinagActivity.class));
                break;
            case R.id.jiangjiapaihang_tehuiche:
                startActivity(new Intent(NewCarActivity.this,THJiangjiaActivity.class));
                break;
        }
    }
}
